package BookStore.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class BDbUtil {
    private static String url = "jdbc:oracle:thin:@localhost:1521:XE";
    private static String userName = "new";
    private static String userPwd = "126875";
    private static Connection con_3;
    private static Connection con_3_1;

    public static Connection getCon_3() throws Exception {
        con_3 = DriverManager.getConnection(url, userName, userPwd);
        return con_3;
    }

    public static void closeCon_3() throws Exception {
        if (con_3 != null) {
            con_3.close();
        }
    }

    public static Connection getCon_3_1() throws Exception {
        con_3_1 = DriverManager.getConnection(url, userName, userPwd);
        return con_3_1;
    }

    public static void closeCon_3_1() throws Exception {
        if (con_3_1 != null) {
            con_3_1.close();
        }
    }

}

